package edu.zzu.mapper;

import edu.zzu.Entity.Message;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface MessageMapper extends Mapper<Message> {

    @Select("select id,updateTime,status,transNodeId from Package where id=#{id}")
    Message getMessageByPackageId(String id);

    @Select("select id,updateTime,status,transNodeId from Package where receiverTel=#{tel}")
    Message getMessageByReceiverTel(String tel);

    @Select("select id,handler,updateTime,status,transNodeId from Package where userId=#{id}")
    List<Message> getMessageByUserId(Long id);
}
